﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.Site.EditNoticModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.IsNew?"新增公告":"修改公告" %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<fieldset>
    <legend><%=Model.IsNew?"新增公告":"修改公告" %></legend>
    <% Html.BeginForm(new { id = "noticeform" }, new { returnurl=Request["returnurl"]}); %>
    <a href='<%=Request["returnurl"]??Url.Action("Notice") %>' class="a_blue">&gt;&gt;列表</a>
    <ul class="editlist">
        <li>
            <label class="label">状态：</label>
            <span class="spans">
            <% Model.States.Each(p => %>
            <%{%>
            <%=Html.RadioButtonFor(pp => pp.Item.State, p.Key, new {id="Item_State_"+p.Key })%>
            <label for="Item_State_<%=p.Key %>"><%=p.Value %></label>
            <% }); %>
            <%=Html.ValidationMessageFor(p=>p.Item.State) %>
            </span>
        </li>
        <li>
            <label class="label">高亮：</label>
            <span class="spans">
            <%=Html.RadioButtonFor(pp => pp.Item.HighLight, true, new { id="Item_HighLight_True"})%>
            <label for="Item_HighLight_True">是</label>
            <%=Html.RadioButtonFor(pp=>pp.Item.HighLight,false, new { id="Item_HighLight_False"}) %>
            <label for="Item_HighLight_False">否</label>
            <%=Html.ValidationMessageFor(p=>p.Item.HighLight) %>
            </span>
        </li>
        <li>
            <label for="Item_Title" class="label">标题：</label>
            <span class="spans">
            <%=Html.TextBoxFor(p => p.Item.Title, new { @class = "text400" }) %>
            <%=Html.ValidationMessageFor(p=>p.Item.Title) %>
            </span>
        </li>
        <li>
            <%=Html.TextAreaFor(p => p.Item.Message) %>
            <%=Html.ValidationMessageFor(p=>p.Item.Message) %>
        </li>
        <li class="btn">
            <%=(Model.IsNew) ? Html.CheckBoxFor(p => p.Continue) + "\r\n<label for='Continue'>继续添加</label>&nbsp;&nbsp;&nbsp;&nbsp;" : string.Empty %>
            <input type="submit" value="保存" />
        </li>
    </ul>
    <%=Html.HiddenFor(p=>p.IsNew) %>
    <%=Html.HiddenFor(p=>p.Item.ID) %>
    <%=Html.SerializableFor(p=>p.States) %>
    <% Html.EndForm(); %>
</fieldset>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.colors.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.styles.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.syntax.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.full.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/xhtml.js") %>' type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#noticeform textarea#Item_Message").css({ width: "100%", height: "300px",'margin-left':'10px' }).htmlbox({
                toolbars: [
                [
                // Cut, Copy, Paste
                "separator", "cut", "copy", "paste",
                // Undo, Redo
                "separator", "undo", "redo",
                // Bold, Italic, Underline, Strikethrough, Sup, Sub
                "separator", "bold", "italic", "underline", "strike", "sup", "sub", "removeformat",
                // Left, Right, Center, Justify
                "separator", "justify", "left", "center", "right",
                // Ordered List, Unordered List, Indent, Outdent
                "separator", "ol", "ul", "indent", "outdent",
                // Hyperlink, Remove Hyperlink, Image
                "separator", "link", "unlink", "image"

                ],
                [// Show code
                "separator", "code",
                // Formats, Font size, Font family, Font color, Font, Background
                "separator", "formats", "fontsize", "fontfamily",
                "separator", "fontcolor", "highlight"
                ]
                ],
                skin: "blue",
                idir: '<%=Url.Content("~/Scripts/htmlbox4.0/images/") %>',
                about: false
            });
        });
    </script>
    <style type="text/css">
    .text400{ width:400px;}
</style>
</asp:Content>
